<template>
  <el-popconfirm :confirm-button-text="props.buttonText" :cancel-button-text="props.cancelTuttonText" :icon="InfoFilled" icon-color="#ffcd43" :title="title"
    @confirm="confirmEvent" @cancel="cancelEvent">
    <template #reference>
      <el-tag type="danger" style="cursor: pointer;margin-right:5px">{{ props.btnName }}</el-tag>
    </template>
  </el-popconfirm>
</template>
<script setup >
import { InfoFilled } from '@element-plus/icons-vue'
const props = defineProps({
  btnName: {
    type: String,
    default: "是否废弃"
  },
  title: {
    type: String,
    default: "确定要废弃该数据?"
  },
  type: {
    type: String,
    default: "danger"
  },
  iconColor: {
    type: String,
    default: "#ffcd43"
  },
  buttonText: {
    type: String,
    default: "确定"
  },
  iconColor: {
    type: String,
    default: "取消"
  }
})
const emit = defineEmits(["confirmEvent", "cancelEvent"])
const confirmEvent = (value) => {
  emit("confirmEvent", value)
}
const cancelEvent = (value) => {
  emit("cancelEvent", value)
}
</script>
<style lang="scss" scoped></style>